﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Cart.ascx.cs" Inherits="Application_Controls_Cart" %>
<table cellpadding="0" cellspacing="0" border="0" style="width:500px;">
<thead>
	<tr>
		<td colspan="6"><CART:MessageBox runat="server" ID="MessageBox01" /></td>
	</tr>
    <tr>
        <th class="CategoryHeadCenter"><asp:Literal runat="server" Text='<%$ Resources:Resource,  Photo %>'></asp:Literal></th>
        <th class="CategoryHeadCenter"><asp:Literal runat="server" Text='<%$ Resources:Resource,  Description %>'></asp:Literal></th>
        <th class="CategoryHeadCenter"><asp:Literal runat="server" Text='<%$ Resources:Resource,  Quantity %>'></asp:Literal></th>
        <th class="CategoryHeadCenter"><asp:Literal runat="server" Text='<%$ Resources:Resource,  UnitPrice %>'></asp:Literal></th>
        <th class="CategoryHeadCenter"><asp:Literal runat="server" Text='<%$ Resources:Resource,  SubTotal %>'></asp:Literal></th>
        <th class="CategoryHeadCenter"></th>
    </tr>
</thead>
<tbody>
    <asp:Repeater runat="server" ID="RepeaterCart" >    
    <ItemTemplate>
        <tr class="tableItem">
            <td style="vertical-align:middle; text-align:center;"><asp:Image runat="server" ImageUrl='<%# Eval("ImagePath") %>' /></td>
            <td>
				<%# Eval("Name") %>-(<%# Eval("SKU") %>)<br />
				<asp:Repeater runat="server" DataSource='<%# Eval("AdditionalAttributes") %>'>
				<ItemTemplate>
					<%# Eval("Type") %>:<%# Eval("Value") %><br />
				</ItemTemplate>
				</asp:Repeater>
            </td>
            <td style="text-align:right;"><asp:TextBox runat="server" ID="TextBoxQuantity" Text='<%# Eval("Quantity")%>' vId='<%# Eval("Id") %>' Width="20"></asp:TextBox></td>            
            <td style="text-align:right;"><%# String.Format("{0:c}",Eval("UnitPrice"))%></td>
            <td style="text-align:right;"><%# String.Format("{0:c}", Eval("SubTotal")) %></td>
            <td style="text-align:right;"><asp:Button runat="server"  CausesValidation="false" ID="b1" OnClick="bDel_Click" vId='<%# Container.ItemIndex %>' Text='<%$ Resources:Resource,  Remove %>' /></td>
        </tr>
        <tr><td colspan="6"><hr /></td></tr>
    </ItemTemplate>    
    </asp:Repeater>
    <tr><td colspan="6"><asp:Literal runat="server" ID="LiteralNoRecords" Text="<%$ Resources:Resource,  NoItemsInTheCart %>"></asp:Literal></td></tr>
    <tr>
		<td style="vertical-align:middle; text-align:center;"><asp:Image ID="ImageShippingCompanyLogo" ImageUrl="~/Application/Controls/img/ShippingIcon.gif" runat="server" /></td>
        <td>
			<asp:Literal runat="server" ID="LiteralShippingCompany"></asp:Literal>
        </td>
        <td style="text-align:right;">1</td>
        <td style="text-align:right;"><asp:Literal runat="server" ID="LiteralShippingUnitCost"></asp:Literal></td>
        <td style="text-align:right;"><asp:Literal runat="server" ID="LiteralShippingSubTotal"></asp:Literal></td>
        <td style="text-align:right;"></td>
	</tr>
	<tr><td colspan="6"><hr /></td></tr>
	<tr style="background-color:#cacaca; font-size:12pt; height:30px;">
		<td colspan="4" style="text-align:right;">Total:</td>
        <td style="text-align:right;"><asp:Literal runat="server" ID="LiteralTotal"></asp:Literal></td>
        <td style="text-align:centers;"><asp:Button runat="server" ID="ButtonUpdate" Text="<%$ Resources:Resource,  Update %>" OnClick="ButtonUpdateCart_Click" /></td>
	</tr>
	<tr>
		<td colspan="6" style="text-align:center">		
		<asp:Button runat="server" ID="ButtonConfirmOrder" Text="<%$ Resources:Resource,  PlaceOrder %>" OnClick="ButtonConfirmOrder_Click" />
		</td>
	</tr>
</tbody>
</table>
<br />

<table>
<tr>
<td>
	<fieldset runat="server" id="Fieldset01"><legend><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Resource,  Checkout %>"></asp:Literal></legend>
	<table>
	<tr>
		<td style="vertical-align:top;" align="center">
			<CART:Login runat="server" ID="Login01" OnLoggedIn="LoggedIn_Occured" />
		</td>	
	</tr>
	<tr><td align="center"><asp:Literal ID="LiteralOrCreateANewUser" runat="server" Text="<%$ Resources:Resource,  OrCreateANewUser %>"></asp:Literal></td></tr>
	<tr>
		<td>	
			<cart:SignUp runat="server" ID="SignUp01"></cart:SignUp>
		</td>
	</tr>
	</table>
	</fieldset>
</td>
</tr>
</table>

